using System;

namespace T0065
{
    /// <summary>
    /// MachineGun
    /// </summary>
    public class MachineGun:Weapon
    {
        public MachineGun(string name, int magazineCapacity, int ammoNumInMc, float attackDis, float fireRate, int totalAmmoNum) : base(name, magazineCapacity, ammoNumInMc, attackDis, fireRate, totalAmmoNum)
        {
        }

        public override void Fire()
        {
            base.Fire();
            if(AmmoNumInMc>=5)
                AmmoNumInMc-=5;
            else
                AmmoNumInMc = 0;
            if (TotalAmmoNum >= 5)
                TotalAmmoNum -= 5;
            else
                TotalAmmoNum = 0;
            Console.WriteLine("Dadadadadda,MachineGun fire!");
            PrintWeaponStatus();
        }
    }
}